import request from '@/utils/request'
import Cookies from 'js-cookie'

// 获取搜索头门店列表
export function getStoreList() {
    return request({

        url: '/General/get_store/-1',
        method: 'post',
        data: {
            category_id: 171
        }
    })
}
//确认出库
export function outsave(data) {
    return request({
        url: '/House_transfer/transfer_order_out_confirm',
        method: 'post',
        data: data
    })
}
//确认入库
export function insave(data) {
    return request({
        url: '/House_transfer/transfer_order_in_confirm',
        method: 'post',
        data: data
    })
}
// 列表
export function getList(data, page) {
    return request({
        url: '/House_transfer/transfer_order_list/' + (page ? page : 1),
        method: 'post',
        data: data
    })
}

// 获取分页
export function getPage(data) {
    return request({
        url: '/House_transfer/transfer_order_page',
        method: 'post',
        data: data
    })
}

// 列表
export function getinfoList(data, page) {
    return request({
        url: '/House_transfer/transfer_order_detail/' + (page ? page : 1),
        method: 'post',
        data: data
    })
}

// 获取分页
export function getinfoPage(data) {
    return request({
        url: '/House_transfer/transfer_order_detail_page',
        method: 'post',
        data: data
    })
}
// 导出
export function getExport(data) {
    window.location.href = `https://${location.host}/smsi/index.php/house_transfer/get_order_excel?type=${data.type}&order_id=${data.order_id}&didixueshengka=${Cookies.get('SMS_AdminToken')}`; 
    // return request({
    //     url: `/machine/get_excel?store_id=${data.store_id}&area_id=${data.area_id}`,
    //     method: 'get',
    //     data:{},
    // })
}